package cn.edu.fzu.homemaking.company.domain.enums;

public enum StatusEnum {
    DELETE(-1, "删除"),
    BAN(1, "禁用"),
    NORMAL(0, "正常");

    private final int    value;
    private final String desc;


    private StatusEnum(int value, String desc) {
        this.value = value;
        this.desc = desc;
    }


    public int getValue() {
        return value;
    }


    public String getDesc() {
        return desc;
    }


    public static StatusEnum parse(int value) {
        switch (value) {
            case -1:
                return DELETE;
            case 0:
                return NORMAL;
            case 1:
                return BAN;
            default:
                return null;
        }
    }

}
